package net.code4life.hsqldb.preferences;


import net.code4life.hsqldb.Activator;

import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;


public class HsqlDBPreferencePage
	extends PreferencePage
	implements IWorkbenchPreferencePage {

	public static final String ID = "net.code4life.hsqldb.preferences.HsqlDBPreferencePage";
	
	public HsqlDBPreferencePage() {
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("HSQLDB Configuration");
	}

	@Override
	public void init(IWorkbench workbench) {
		
	}

	@Override
	protected Control createContents(Composite parent) {
		Composite comp = createComposite(parent);
		comp.setLayout(new GridLayout());
		Group group = new Group(comp, SWT.LEFT);
		group.setText("Configruation");
		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		group.setLayout(new FillLayout());
		Label label = new Label(group, SWT.NONE);
		label.setText("Test");
		return comp;
	}
	protected Composite createComposite(Composite parent) {
		Composite composite = new Composite(parent, SWT.NONE);
		GridData data = new GridData(GridData.FILL_BOTH);
		composite.setLayoutData(data);
		composite.setFont(parent.getFont());
		GridLayout layout = new GridLayout();
		layout.marginWidth = 0;
		layout.marginHeight = 0;
		layout.verticalSpacing = 10;
		composite.setLayout(layout);
		return composite;
	}

	
	
}